package mn.idax.exchange.otc.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
import mn.idax.exchange.otc.entity.OTCOrder;

import java.io.Serializable;

@Data
@NoArgsConstructor
public class OrderUserDto implements Serializable {
    private String orderId;
    private Integer buyer;
    private Integer seller;

    public static OrderUserDto OrderToOrderUserDto(OTCOrder otcOrder) {
        OrderUserDto orderUserDto = new OrderUserDto();
        orderUserDto.setOrderId(otcOrder.getUniquekey());
        orderUserDto.setBuyer(otcOrder.getBuyer());
        orderUserDto.setSeller(otcOrder.getSeller());
        return orderUserDto;
    }
}
